package com.TempletGenerate;
/*
*
* 小数生成器,可控制长度,最大,最小
模型为RandomDecimals(数组,长度,最小,最大)  返回一个数组
*
*
* */
public class DecimalsNumGenerate {

    public double[] RandomDecimals(int len,double min,double max){
        double[] doubles = new double[len];
        for (int i = 0; i < len; i++) {
            doubles[i] = min+Math.random()*(max-min);
        }
        return doubles;
    }


    public static void main(String[] args) {
        DecimalsNumGenerate decimalsNumGenerate = new DecimalsNumGenerate();

        double[] doubles1 = decimalsNumGenerate.RandomDecimals(100, 0.8, 5.6);

        for (double v : doubles1) {
            System.out.print(v+" ");
        }

    }


}
